package com.yanqu.road.server.cmd.player;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.assistant.AssistantSkinProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = CrossProtocol.C_CROSS_SEE_OTHER_ASSISTANT_RESP, desc = "跨服查看其他玩家小助手返回信息")
public class CrossSeeOtherPlayerAssistantRespCmd extends CrossCommand {
    private AssistantSkinProto.CrossSeeOtherAssistantRespMsg msg;

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        msg = AssistantSkinProto.CrossSeeOtherAssistantRespMsg.parseFrom(packet.getBytes());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        YanQuMessage message = YanQuMessageUtils.buildMessage(ClientProtocol.U_SEE_OTHER_ASSISTANT, msg.getMsg());
        MessageHelper.sendPacket(msg.getOriginServerId(), msg.getOriginPlayerId(), message);
    }

    @Override
    public void sendData() {

    }
}
